package com.ecube.maintenance.pojos;

import com.ecube.maintenance.biz.commons.IListItem;

import java.util.List;

/**
 * Created by Trible Chen on 2014/9/17.
 */
public class CarPropertyListInfo {

    List<BaseCarPropertyList> content;
    String type;//brand serial model
    int brandid;//如果没有 则为0
    int serialID;//如果没有 则为0

    public List<BaseCarPropertyList> getContent() {
        return content;
    }

    public void setContent(List<BaseCarPropertyList> content) {
        this.content = content;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public int getBrandid() {
        return brandid;
    }

    public void setBrandid(int brandid) {
        this.brandid = brandid;
    }

    public int getSerialID() {
        return serialID;
    }

    public void setSerialID(int serialID) {
        this.serialID = serialID;
    }

    public static class BaseCarPropertyList implements IListItem<BaseCarPropertyList.BaseCarProperty>{
        String key;//data列表所属分类
        List<BaseCarProperty> data;

        public String getKey() {
            return key;
        }

        public void setKey(String key) {
            this.key = key;
        }

        public List<BaseCarProperty> getData() {
            return data;
        }

        public void setData(List<BaseCarProperty> data) {
            this.data = data;
        }

        @Override
        public boolean isSection() {
            return true;
        }

        @Override
        public String getSectionName() {
            return key;
        }

        @Override
        public BaseCarProperty getInfo() {
            return null;
        }

        public static class BaseCarProperty implements IListItem<BaseCarProperty> {
            int id;//属性id
            String name;//属性名字

            public int getId() {
                return id;
            }

            public void setId(int id) {
                this.id = id;
            }

            public String getName() {
                return name;
            }

            public void setName(String name) {
                this.name = name;
            }

            @Override
            public boolean isSection() {
                return false;
            }

            @Override
            public String getSectionName() {
                return null;
            }

            @Override
            public BaseCarProperty getInfo() {
                return this;
            }
        }
    }

}
